project(JavaScriptCore)

set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 17)

set(DYLIB_COMPAT_VERSION "1.0.0")
set(DYLIB_CURRENT_VERSION "608.4.9")

add_compile_definitions(
	#NDEBUG
	ENABLE_3D_TRANSFORMS
	ENABLE_APPLE_PAY
	ENABLE_APPLE_PAY_SESSION_V3
	ENABLE_APPLE_PAY_SESSION_V4
	ENABLE_APPLICATION_MANIFEST
	ENABLE_ATTACHMENT_ELEMENT
	ENABLE_AVF_CAPTIONS
	ENABLE_CACHE_PARTITIONING
	ENABLE_CHANNEL_MESSAGING
	ENABLE_CONTENT_FILTERING
	ENABLE_CSS_BOX_DECORATION_BREAK
	ENABLE_CSS_COMPOSITING
	ENABLE_CSS_CONIC_GRADIENTS
	ENABLE_CSS_PAINTING_API
	ENABLE_CSS_SCROLL_SNAP
	ENABLE_CSS_SELECTORS_LEVEL4
	ENABLE_CSS_TRAILING_WORD
	ENABLE_CSS_TYPED_OM
	ENABLE_CURSOR_VISIBILITY
	ENABLE_DARK_MODE_CSS
	ENABLE_DATACUE_VALUE
	ENABLE_DATALIST_ELEMENT
	ENABLE_ENCRYPTED_MEDIA
	ENABLE_FILTERS_LEVEL_2
	ENABLE_FTL_JIT
	ENABLE_FULLSCREEN_API
	ENABLE_GAMEPAD
	ENABLE_GEOLOCATION
	ENABLE_INDEXED_DATABASE
	ENABLE_INDEXED_DATABASE_IN_WORKERS
	ENABLE_INPUT_TYPE_COLOR
	ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS
	ENABLE_INTERSECTION_OBSERVER
	ENABLE_INTL
	ENABLE_KEYBOARD_CODE_ATTRIBUTE
	ENABLE_KEYBOARD_KEY_ATTRIBUTE
	ENABLE_LEGACY_CSS_VENDOR_PREFIXES
	ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER
	ENABLE_LEGACY_ENCRYPTED_MEDIA
	ENABLE_MAC_GESTURE_EVENTS
	ENABLE_MAC_VIDEO_TOOLBOX
	ENABLE_MATHML
	ENABLE_MEDIA_CONTROLS_SCRIPT
	ENABLE_MEDIA_SOURCE
	ENABLE_MEDIA_STREAM
	ENABLE_MEMORY_SAMPLER
	ENABLE_METER_ELEMENT
	ENABLE_MOUSE_CURSOR_SCALE
	ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION
	ENABLE_NOTIFICATIONS
	ENABLE_PAYMENT_REQUEST
	ENABLE_PDFKIT_PLUGIN
	ENABLE_POINTER_EVENTS
	ENABLE_POINTER_LOCK
	ENABLE_PUBLIC_SUFFIX_LIST
	ENABLE_REMOTE_INSPECTOR
	ENABLE_RESIZE_OBSERVER
	ENABLE_RESOURCE_LOAD_STATISTICS
	ENABLE_RESOURCE_USAGE
	ENABLE_RUBBER_BANDING
	ENABLE_SANDBOX_EXTENSIONS
	ENABLE_SERVER_PRECONNECT
	ENABLE_SERVICE_CONTROLS
	ENABLE_SERVICE_WORKER
	ENABLE_SHAREABLE_RESOURCE
	ENABLE_SPEECH_SYNTHESIS
	ENABLE_STREAMS_API
	ENABLE_SVG_FONTS
	ENABLE_TELEPHONE_NUMBER_DETECTION
	ENABLE_TEXT_AUTOSIZING
	ENABLE_USERSELECT_ALL
	ENABLE_USER_MESSAGE_HANDLERS
	ENABLE_VARIATION_FONTS
	ENABLE_VIDEO
	ENABLE_VIDEO_PRESENTATION_MODE
	ENABLE_VIDEO_TRACK
	ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN
	ENABLE_WEBDRIVER_MOUSE_INTERACTIONS
	ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS
	ENABLE_WEBGL
	ENABLE_WEBGL2
	ENABLE_WEBGPU
	ENABLE_WEB_AUDIO
	ENABLE_WEB_AUTHN
	ENABLE_WEB_CRYPTO
	ENABLE_WEB_PROCESS_SANDBOX
	ENABLE_WEB_RTC
	ENABLE_WIRELESS_PLAYBACK_TARGET
	ENABLE_XSLT
	U_HIDE_DEPRECATED_API
	U_DISABLE_RENAMING=1
	U_SHOW_CPLUSPLUS_API=0

	PRIVATE # For kdebug
)

set(JSC_PUBLIC_HEADERS
	API/JavaScript.h
	API/JavaScriptCore.h
	API/JSBase.h
	API/JSContext.h
	API/JSContextRef.h
	API/JSExport.h
	API/JSManagedValue.h
	API/JSObjectRef.h
	API/JSStringRef.h
	API/JSStringRefCF.h
	API/JSTypedArray.h
	API/JSValue.h
	API/JSValueRef.h
	API/JSVirtualMachine.h
	API/WebKitAvailability.h
)

set(JSC_PRIVATE_HEADERS
	DerivedSources/Bytecodes.h
	DerivedSources/JSCBuiltins.h

	DerivedSources/inspector/InspectorBackendDispatchers.h
	DerivedSources/inspector/InspectorFrontendDispatchers.h
	DerivedSources/inspector/InspectorProtocolObjects.h

	API/APICallbackFunction.h
	API/APICast.h
	API/APIUtils.h
	API/JSAPIValueWrapper.h
	API/JSAPIWrapperObject.h
	API/JSBasePrivate.h
	API/JSCTestRunnerUtils.h
	API/JSCallbackConstructor.h
	API/JSCallbackFunction.h
	API/JSCallbackObject.h
	API/JSCallbackObjectFunctions.h
	API/JSClassRef.h
	API/JSContextInternal.h
	API/JSContextPrivate.h
	API/JSContextRefInspectorSupport.h
	API/JSContextRefInternal.h
	API/JSContextRefPrivate.h
	API/JSHeapFinalizerPrivate.h
	API/JSManagedValueInternal.h
	API/JSMarkingConstraintPrivate.h
	API/JSObjectRefPrivate.h
	API/JSRemoteInspector.h
	API/JSRetainPtr.h
	API/JSScriptRefPrivate.h
	API/JSStringRefPrivate.h
	API/JSValueInternal.h
	API/JSValuePrivate.h
	API/JSVirtualMachineInternal.h
	API/JSWeakObjectMapRefInternal.h
	API/JSWeakObjectMapRefPrivate.h
	API/JSWeakPrivate.h
	API/JSWrapperMap.h
	API/ObjCCallbackFunction.h
	API/ObjcRuntimeExtras.h
	API/OpaqueJSString.h

	assembler/ARM64Assembler.h
	assembler/ARM64Registers.h
	assembler/ARMv7Assembler.h
	assembler/ARMv7Registers.h
	assembler/AbortReason.h
	assembler/AbstractMacroAssembler.h
	assembler/AssemblerBuffer.h
	assembler/AssemblerBufferWithConstantPool.h
	assembler/AssemblerCommon.h
	assembler/CPU.h
	assembler/CodeLocation.h
	assembler/LinkBuffer.h
	assembler/MIPSAssembler.h
	assembler/MIPSRegisters.h
	assembler/MacroAssembler.h
	assembler/MacroAssemblerARM64.h
	assembler/MacroAssemblerARMv7.h
	assembler/MacroAssemblerCodeRef.h
	assembler/MacroAssemblerHelpers.h
	assembler/MacroAssemblerMIPS.h
	assembler/MacroAssemblerX86.h
	assembler/MacroAssemblerX86Common.h
	assembler/MacroAssemblerX86_64.h
	assembler/Printer.h
	assembler/RegisterInfo.h
	assembler/X86Assembler.h
	assembler/X86Registers.h
	assembler/X86_64Registers.h

	bindings/ScriptFunctionCall.h
	bindings/ScriptObject.h
	bindings/ScriptValue.h

	builtins/BuiltinNames.h
	builtins/BuiltinUtils.h

	bytecode/ArrayAllocationProfile.h
	bytecode/ArrayProfile.h
	bytecode/ByValInfo.h
	bytecode/BytecodeConventions.h
	bytecode/BytecodeIntrinsicRegistry.h
	bytecode/CallEdge.h
	bytecode/CallLinkInfo.h
	bytecode/CallMode.h
	bytecode/CallVariant.h
	bytecode/CodeBlock.h
	bytecode/CodeBlockHash.h
	bytecode/CodeOrigin.h
	bytecode/CodeType.h
	bytecode/DFGExitProfile.h
	bytecode/DataFormat.h
	bytecode/DirectEvalCodeCache.h
	bytecode/ExecutableInfo.h
	bytecode/ExecutableToCodeBlockEdge.h
	bytecode/ExecutionCounter.h
	bytecode/ExitKind.h
	bytecode/ExitingInlineKind.h
	bytecode/ExitingJITType.h
	bytecode/ExpressionRangeInfo.h
	bytecode/HandlerInfo.h
	bytecode/ICStatusMap.h
	bytecode/InlineCallFrame.h
	bytecode/Instruction.h
	bytecode/InstructionStream.h
	bytecode/InternalFunctionAllocationProfile.h
	bytecode/JumpTable.h
	bytecode/LLIntCallLinkInfo.h
	bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h
	bytecode/LazyOperandValueProfile.h
	bytecode/MetadataTable.h
	bytecode/ObjectAllocationProfile.h
	bytecode/ObjectPropertyCondition.h
	bytecode/Opcode.h
	bytecode/OpcodeSize.h
	bytecode/PropertyCondition.h
	bytecode/PutByIdFlags.h
	bytecode/SpecialPointer.h
	bytecode/SpeculatedType.h
	bytecode/StructureSet.h
	bytecode/SuperSampler.h
	bytecode/ToThisStatus.h
	bytecode/TypeLocation.h
	bytecode/UnlinkedCodeBlock.h
	bytecode/UnlinkedEvalCodeBlock.h
	bytecode/UnlinkedFunctionExecutable.h
	bytecode/UnlinkedGlobalCodeBlock.h
	bytecode/UnlinkedMetadataTable.h
	bytecode/ValueProfile.h
	bytecode/ValueRecovery.h
	bytecode/VariableWriteFireDetail.h
	bytecode/VirtualRegister.h
	bytecode/Watchpoint.h

	debugger/Breakpoint.h
	debugger/Debugger.h
	debugger/DebuggerCallFrame.h
	debugger/DebuggerParseData.h
	debugger/DebuggerPrimitives.h

	dfg/DFGCommon.h
	dfg/DFGCompilationMode.h
	dfg/DFGMinifiedID.h

	domjit/DOMJITAbstractHeap.h
	domjit/DOMJITCallDOMGetterSnippet.h
	domjit/DOMJITEffect.h
	domjit/DOMJITGetterSetter.h
	domjit/DOMJITHeapRange.h
	domjit/DOMJITSignature.h

	heap/AlignedMemoryAllocator.h
	heap/AllocationFailureMode.h
	heap/Allocator.h
	heap/AllocatorInlines.h
	heap/AllocatorForMode.h
	heap/BlockDirectory.h
	heap/BlockDirectoryInlines.h
	heap/CellAttributes.h
	heap/CellContainer.h
	heap/CellContainerInlines.h
	heap/CellState.h
	heap/CollectionScope.h
	heap/CollectorPhase.h
	heap/CompleteSubspace.h
	heap/CompleteSubspaceInlines.h
	heap/ConstraintConcurrency.h
	heap/ConstraintParallelism.h
	heap/ConstraintVolatility.h
	heap/DeferGC.h
	heap/DeleteAllCodeEffort.h
	heap/DestructionMode.h
	heap/FastMallocAlignedMemoryAllocator.h
	heap/FreeList.h
	heap/FreeListInlines.h
	heap/GCActivityCallback.h
	heap/GCAssertions.h
	heap/GCConductor.h
	heap/GCDeferralContext.h
	heap/GCIncomingRefCounted.h
	heap/GCIncomingRefCountedInlines.h
	heap/GCIncomingRefCountedSet.h
	heap/GCLogging.h
	heap/GCRequest.h
	heap/GCSegmentedArray.h
	heap/Handle.h
	heap/HandleBlock.h
	heap/HandleSet.h
	heap/HandleTypes.h
	heap/Heap.h
	heap/HeapCell.h
	heap/HeapCellInlines.h
	heap/HeapCellType.h
	heap/HeapFinalizerCallback.h
	heap/HeapInlines.h
	heap/HeapObserver.h
	heap/HeapSnapshotBuilder.h
	heap/IncrementalSweeper.h
	heap/IsoCellSet.h
	heap/IsoSubspace.h
	heap/IsoSubspaceInlines.h
	heap/IsoSubspacePerVM.h
	heap/LargeAllocation.h
	heap/LocalAllocator.h
	heap/LocalAllocatorInlines.h
	heap/LockDuringMarking.h
	heap/MachineStackMarker.h
	heap/MarkStack.h
	heap/MarkedBlock.h
	heap/MarkedBlockInlines.h
	heap/MarkedBlockSet.h
	heap/MarkedSpace.h
	heap/MarkingConstraint.h
	heap/MutatorState.h
	heap/PackedCellPtr.h
	heap/RegisterState.h
	heap/RunningScope.h
	heap/SimpleMarkingConstraint.h
	heap/SlotVisitor.h
	heap/SlotVisitorInlines.h
	heap/Strong.h
	heap/StrongInlines.h
	heap/Subspace.h
	heap/SubspaceInlines.h
	heap/Synchronousness.h
	heap/TinyBloomFilter.h
	heap/VisitRaceKey.h
	heap/Weak.h
	heap/WeakBlock.h
	heap/WeakHandleOwner.h
	heap/WeakImpl.h
	heap/WeakInlines.h
	heap/WeakSet.h
	heap/WeakSetInlines.h

	inspector/ConsoleMessage.h
	inspector/ContentSearchUtilities.h
	inspector/IdentifiersFactory.h
	inspector/InjectedScript.h
	inspector/InjectedScriptBase.h
	inspector/InjectedScriptHost.h
	inspector/InjectedScriptManager.h
	inspector/InjectedScriptModule.h
	inspector/InspectorAgentBase.h
	inspector/InspectorAgentRegistry.h
	inspector/InspectorBackendDispatcher.h
	inspector/InspectorEnvironment.h
	inspector/InspectorFrontendChannel.h
	inspector/InspectorFrontendRouter.h
	inspector/InspectorProtocolTypes.h
	inspector/InspectorTarget.h
	inspector/PerGlobalObjectWrapperWorld.h
	inspector/ScriptArguments.h
	inspector/ScriptBreakpoint.h
	inspector/ScriptCallFrame.h
	inspector/ScriptCallStack.h
	inspector/ScriptCallStackFactory.h
	inspector/ScriptDebugListener.h
	inspector/ScriptDebugServer.h

	inspector/agents/InspectorAgent.h
	inspector/agents/InspectorAuditAgent.h
	inspector/agents/InspectorConsoleAgent.h
	inspector/agents/InspectorDebuggerAgent.h
	inspector/agents/InspectorHeapAgent.h
	inspector/agents/InspectorRuntimeAgent.h
	inspector/agents/InspectorScriptProfilerAgent.h
	inspector/agents/InspectorTargetAgent.h

	inspector/augmentable/AugmentableInspectorControllerClient.h

	inspector/remote/RemoteAutomationTarget.h
	inspector/remote/RemoteControllableTarget.h
	inspector/remote/RemoteInspectionTarget.h
	inspector/remote/RemoteInspector.h

	inspector/remote/cocoa/RemoteInspectorXPCConnection.h

	interpreter/AbstractPC.h
	interpreter/CallFrame.h
	interpreter/CallFrameInlines.h
	interpreter/CalleeBits.h
	interpreter/EntryFrame.h
	interpreter/FrameTracers.h
	interpreter/Register.h
	interpreter/ShadowChicken.h
	interpreter/StackVisitor.h
	interpreter/VMEntryRecord.h

	jit/AssemblyHelpers.h
	jit/CCallHelpers.h
	jit/ExecutableAllocator.h
	jit/FPRInfo.h
	jit/GCAwareJITStubRoutine.h
	jit/GPRInfo.h
	jit/JITAllocator.h
	jit/JITCode.h
	jit/JITCodeMap.h
	jit/JITCompilationEffort.h
	jit/JITMathICForwards.h
	jit/JITOperations.h
	jit/JITStubRoutine.h
	jit/JITThunks.h
	jit/PolymorphicCallStubRoutine.h
	jit/Reg.h
	jit/RegisterAtOffset.h
	jit/RegisterAtOffsetList.h
	jit/RegisterSet.h
	jit/Snippet.h
	jit/SnippetParams.h
	jit/SnippetReg.h
	jit/SnippetSlowPathCalls.h
	jit/SpillRegistersMode.h
	jit/TagRegistersMode.h
	jit/TempRegisterSet.h
	jit/ThunkGenerator.h
	jit/UnusedPointer.h

	llint/LLIntOpcode.h

	parser/Lexer.h
	parser/ParserArena.h
	parser/ParserError.h
	parser/ParserModes.h
	parser/ParserTokens.h
	parser/SourceCode.h
	parser/SourceProvider.h
	parser/SourceProviderCache.h
	parser/SourceProviderCacheItem.h
	parser/UnlinkedSourceCode.h
	parser/VariableEnvironment.h

	profiler/ProfilerBytecode.h
	profiler/ProfilerBytecodeSequence.h
	profiler/ProfilerBytecodes.h
	profiler/ProfilerCompilation.h
	profiler/ProfilerCompilationKind.h
	profiler/ProfilerCompiledBytecode.h
	profiler/ProfilerDatabase.h
	profiler/ProfilerEvent.h
	profiler/ProfilerExecutionCounter.h
	profiler/ProfilerJettisonReason.h
	profiler/ProfilerOSRExit.h
	profiler/ProfilerOSRExitSite.h
	profiler/ProfilerOrigin.h
	profiler/ProfilerOriginStack.h
	profiler/ProfilerProfiledBytecodes.h
	profiler/ProfilerUID.h

	runtime/AbstractModuleRecord.h
	runtime/ArgList.h
	runtime/ArityCheckMode.h
	runtime/ArrayBuffer.h
	runtime/ArrayBufferSharingMode.h
	runtime/ArrayBufferView.h
	runtime/ArrayConventions.h
	runtime/ArrayPrototype.h
	runtime/ArrayStorage.h
	runtime/AuxiliaryBarrier.h
	runtime/AuxiliaryBarrierInlines.h
	runtime/BasicBlockLocation.h
	runtime/BatchedTransitionOptimizer.h
	runtime/BigIntPrototype.h
	runtime/BooleanObject.h
	runtime/BooleanPrototype.h
	runtime/Butterfly.h
	runtime/ButterflyInlines.h
	runtime/BytecodeCacheError.h
	runtime/CachePayload.h
	runtime/CacheUpdate.h
	runtime/CachedBytecode.h
	runtime/CachedTypes.h
	runtime/CagedBarrierPtr.h
	runtime/CallData.h
	runtime/CatchScope.h
	runtime/ClassInfo.h
	runtime/CodeSpecializationKind.h
	runtime/CommonIdentifiers.h
	runtime/CompilationResult.h
	runtime/Completion.h
	runtime/ConcurrentJSLock.h
	runtime/ConfigFile.h
	runtime/ConsoleClient.h
	runtime/ConsoleTypes.h
	runtime/ConstantMode.h
	runtime/ConstructAbility.h
	runtime/ConstructData.h
	runtime/ControlFlowProfiler.h
	runtime/CustomGetterSetter.h
	runtime/DOMAnnotation.h
	runtime/DOMAttributeGetterSetter.h
	runtime/DataView.h
	runtime/DateInstance.h
	runtime/DateInstanceCache.h
	runtime/DefinePropertyAttributes.h
	runtime/DirectArgumentsOffset.h
	runtime/DirectEvalExecutable.h
	runtime/DisallowScope.h
	runtime/DisallowVMReentry.h
	runtime/DumpContext.h
	runtime/EnumerationMode.h
	runtime/Error.h
	runtime/ErrorHandlingScope.h
	runtime/ErrorInstance.h
	runtime/ErrorPrototype.h
	runtime/ErrorType.h
	runtime/EvalExecutable.h
	runtime/Exception.h
	runtime/ExceptionEventLocation.h
	runtime/ExceptionHelpers.h
	runtime/ExceptionScope.h
	runtime/ExecutableBase.h
	runtime/ExecutableBaseInlines.h
	runtime/Float32Array.h
	runtime/Float64Array.h
	runtime/FunctionConstructor.h
	runtime/FunctionExecutable.h
	runtime/FunctionHasExecutedCache.h
	runtime/FunctionPrototype.h
	runtime/FunctionRareData.h
	runtime/FuzzerAgent.h
	runtime/GenericOffset.h
	runtime/GenericTypedArrayView.h
	runtime/GenericTypedArrayViewInlines.h
	runtime/GetPutInfo.h
	runtime/GlobalExecutable.h
	runtime/HashMapImpl.h
	runtime/Identifier.h
	runtime/IdentifierInlines.h
	runtime/IndexingHeader.h
	runtime/IndexingHeaderInlines.h
	runtime/IndexingType.h
	runtime/InferredValue.h
	runtime/InitializeThreading.h
	runtime/Int16Array.h
	runtime/Int32Array.h
	runtime/Int8Array.h
	runtime/InternalFunction.h
	runtime/Intrinsic.h
	runtime/IterationKind.h
	runtime/IterationStatus.h
	runtime/IteratorOperations.h
	runtime/IteratorPrototype.h
	runtime/JSArray.h
	runtime/JSArrayBuffer.h
	runtime/JSArrayBufferPrototype.h
	runtime/JSArrayBufferView.h
	runtime/JSArrayBufferViewInlines.h
	runtime/JSBigInt.h
	runtime/JSCInlines.h
	runtime/JSCJSValue.h
	runtime/JSCJSValueInlines.h
	runtime/JSCPtrTag.h
	runtime/JSCallee.h
	runtime/JSCast.h
	runtime/JSCell.h
	runtime/JSCellInlines.h
	runtime/JSDataView.h
	runtime/JSDestructibleObject.h
	runtime/JSDestructibleObjectHeapCellType.h
	runtime/JSExportMacros.h
	runtime/JSFunction.h
	runtime/JSFunctionInlines.h
	runtime/JSGenericTypedArrayView.h
	runtime/JSGenericTypedArrayViewInlines.h
	runtime/JSGenericTypedArrayViewPrototype.h
	runtime/JSGenericTypedArrayViewPrototypeInlines.h
	runtime/JSGlobalLexicalEnvironment.h
	runtime/JSGlobalObject.h
	runtime/JSGlobalObjectFunctions.h
	runtime/JSGlobalObjectInlines.h
	runtime/JSImmutableButterfly.h
	runtime/JSInternalPromise.h
	runtime/JSInternalPromiseDeferred.h
	runtime/JSMicrotask.h
	runtime/JSLock.h
	runtime/JSMap.h
	runtime/JSMapIterator.h
	runtime/JSModuleLoader.h
	runtime/JSModuleRecord.h
	runtime/JSNativeStdFunction.h
	runtime/JSNonDestructibleProxy.h
	runtime/JSONObject.h
	runtime/JSObject.h
	runtime/JSObjectInlines.h
	runtime/JSPromise.h
	runtime/JSPromiseConstructor.h
	runtime/JSPromiseDeferred.h
	runtime/JSPropertyNameEnumerator.h
	runtime/JSProxy.h
	runtime/JSRunLoopTimer.h
	runtime/JSScope.h
	runtime/JSScriptFetchParameters.h
	runtime/JSScriptFetcher.h
	runtime/JSSegmentedVariableObject.h
	runtime/JSSet.h
	runtime/JSSetIterator.h
	runtime/JSSourceCode.h
	runtime/JSString.h
	runtime/JSStringInlines.h
	runtime/JSSymbolTableObject.h
	runtime/JSType.h
	runtime/JSTypeInfo.h
	runtime/JSTypedArrays.h
	runtime/JSWithScope.h
	runtime/JSWrapperObject.h
	runtime/LazyClassStructure.h
	runtime/LazyProperty.h
	runtime/LeafExecutable.h
	runtime/Lookup.h
	runtime/MatchResult.h
	runtime/MathCommon.h
	runtime/MemoryStatistics.h
	runtime/Microtask.h
	runtime/ModuleProgramExecutable.h
	runtime/NativeExecutable.h
	runtime/NativeFunction.h
	runtime/NumberObject.h
	runtime/NumberPrototype.h
	runtime/NumericStrings.h
	runtime/ObjectConstructor.h
	runtime/ObjectInitializationScope.h
	runtime/ObjectPrototype.h
	runtime/Operations.h
	runtime/Options.h
	runtime/ParseInt.h
	runtime/PrivateName.h
	runtime/ProgramExecutable.h
	runtime/PromiseDeferredTimer.h
	runtime/PropertyDescriptor.h
	runtime/PropertyMapHashTable.h
	runtime/PropertyName.h
	runtime/PropertyNameArray.h
	runtime/PropertyOffset.h
	runtime/PropertySlot.h
	runtime/PropertyStorage.h
	runtime/Protect.h
	runtime/PrototypeKey.h
	runtime/PureNaN.h
	runtime/PutDirectIndexMode.h
	runtime/PutPropertySlot.h
	runtime/RegExp.h
	runtime/RegExpCachedResult.h
	runtime/RegExpGlobalData.h
	runtime/RegExpKey.h
	runtime/RegExpObject.h
	runtime/RegExpStringIteratorPrototype.h
	runtime/RuntimeFlags.h
	runtime/RuntimeType.h
	runtime/SamplingProfiler.h
	runtime/ScopeOffset.h
	runtime/ScopedArgumentsTable.h
	runtime/ScriptExecutable.h
	runtime/ScriptFetchParameters.h
	runtime/ScriptFetcher.h
	runtime/SlowPathReturnType.h
	runtime/SmallStrings.h
	runtime/SourceOrigin.h
	runtime/SparseArrayValueMap.h
	runtime/StackAlignment.h
	runtime/StackFrame.h
	runtime/StringObject.h
	runtime/StringPrototype.h
	runtime/Structure.h
	runtime/StructureCache.h
	runtime/StructureChain.h
	runtime/StructureIDBlob.h
	runtime/StructureIDTable.h
	runtime/StructureInlines.h
	runtime/StructureRareData.h
	runtime/StructureRareDataInlines.h
	runtime/StructureTransitionTable.h
	runtime/SubspaceAccess.h
	runtime/Symbol.h
	runtime/SymbolPrototype.h
	runtime/SymbolTable.h
	runtime/SymbolTableOrScopeDepth.h
	runtime/TemplateObjectDescriptor.h
	runtime/TestRunnerUtils.h
	runtime/ThrowScope.h
	runtime/ToNativeFromValue.h
	runtime/TypeError.h
	runtime/TypeSet.h
	runtime/TypedArrayAdaptors.h
	runtime/TypedArrayController.h
	runtime/TypedArrayInlines.h
	runtime/TypedArrayType.h
	runtime/TypedArrays.h
	runtime/TypeofType.h
	runtime/Uint16Array.h
	runtime/Uint32Array.h
	runtime/Uint8Array.h
	runtime/Uint8ClampedArray.h
	runtime/VM.h
	runtime/VMEntryScope.h
	runtime/VMInlines.h
	runtime/VMTraps.h
	runtime/VarOffset.h
	runtime/Watchdog.h
	runtime/WeakGCMap.h
	runtime/WeakGCMapInlines.h
	runtime/WriteBarrier.h
	runtime/WriteBarrierInlines.h

	wasm/WasmCapabilities.h
	wasm/WasmCodeBlock.h
	wasm/WasmContext.h
	wasm/WasmEmbedder.h
	wasm/WasmExceptionType.h
	wasm/WasmFaultSignalHandler.h
	wasm/WasmIndexOrName.h
	wasm/WasmMemory.h
	wasm/WasmMemoryMode.h
	wasm/WasmModule.h
	wasm/WasmName.h
	wasm/WasmNameSection.h
	wasm/WasmPageCount.h
	wasm/WasmTierUpCount.h

	wasm/js/JSWebAssemblyModule.h
	wasm/js/WebAssemblyPrototype.h

	yarr/RegularExpression.h
	yarr/Yarr.h
	yarr/YarrErrorCode.h
	yarr/YarrFlags.h
	yarr/YarrInterpreter.h
	yarr/YarrJIT.h
	yarr/YarrParser.h
	yarr/YarrPattern.h
	yarr/YarrUnicodeProperties.h
)

function(setup_forwarded_headers destination)
	foreach(FILE IN LISTS ARGN)
		get_filename_component(FILENAME "${FILE}" NAME)
		if (NOT EXISTS "${destination}/JavaScriptCore/${FILENAME}")
			file(WRITE "${destination}/JavaScriptCore/${FILENAME}" "// automatically generated; don't edit (you'd just be wasting your time)\n#include <${FILE}>")
		endif()
	endforeach()
endfunction()

setup_forwarded_headers("${CMAKE_CURRENT_BINARY_DIR}/public" ${JSC_PUBLIC_HEADERS})
setup_forwarded_headers("${CMAKE_CURRENT_BINARY_DIR}/private" ${JSC_PRIVATE_HEADERS})

include_directories(
	${CMAKE_CURRENT_SOURCE_DIR}

	${CMAKE_CURRENT_SOURCE_DIR}/DerivedSources/JavaScriptCore
	${CMAKE_CURRENT_SOURCE_DIR}/DerivedSources/JavaScriptCore/inspector

	${CMAKE_CURRENT_SOURCE_DIR}/API
	${CMAKE_CURRENT_SOURCE_DIR}/assembler
	${CMAKE_CURRENT_SOURCE_DIR}/b3
	${CMAKE_CURRENT_SOURCE_DIR}/b3/air
	${CMAKE_CURRENT_SOURCE_DIR}/bindings
	${CMAKE_CURRENT_SOURCE_DIR}/builtins
	${CMAKE_CURRENT_SOURCE_DIR}/bytecode
	${CMAKE_CURRENT_SOURCE_DIR}/bytecompiler
	${CMAKE_CURRENT_SOURCE_DIR}/debugger
	${CMAKE_CURRENT_SOURCE_DIR}/dfg
	${CMAKE_CURRENT_SOURCE_DIR}/disassembler
	${CMAKE_CURRENT_SOURCE_DIR}/disassembler/ARM64
	${CMAKE_CURRENT_SOURCE_DIR}/disassembler/udis86
	${CMAKE_CURRENT_SOURCE_DIR}/domjit
	${CMAKE_CURRENT_SOURCE_DIR}/ftl
	${CMAKE_CURRENT_SOURCE_DIR}/heap
	${CMAKE_CURRENT_SOURCE_DIR}/inspector
	${CMAKE_CURRENT_SOURCE_DIR}/inspector/agents
	${CMAKE_CURRENT_SOURCE_DIR}/inspector/augmentable
	${CMAKE_CURRENT_SOURCE_DIR}/inspector/remote
	${CMAKE_CURRENT_SOURCE_DIR}/inspector/remote/cocoa
	${CMAKE_CURRENT_SOURCE_DIR}/inspector/remote/glib
	${CMAKE_CURRENT_SOURCE_DIR}/inspector/remote/socket
	${CMAKE_CURRENT_SOURCE_DIR}/interpreter
	${CMAKE_CURRENT_SOURCE_DIR}/jit
	${CMAKE_CURRENT_SOURCE_DIR}/llint
	${CMAKE_CURRENT_SOURCE_DIR}/parser
	${CMAKE_CURRENT_SOURCE_DIR}/profiler
	${CMAKE_CURRENT_SOURCE_DIR}/runtime
	${CMAKE_CURRENT_SOURCE_DIR}/tools
	${CMAKE_CURRENT_SOURCE_DIR}/wasm
	${CMAKE_CURRENT_SOURCE_DIR}/wasm/js
	${CMAKE_CURRENT_SOURCE_DIR}/yarr

	${CMAKE_CURRENT_BINARY_DIR}/public
	${CMAKE_CURRENT_BINARY_DIR}/private

	${CMAKE_CURRENT_SOURCE_DIR}/include
)

# Necessary for WTF headers
add_compile_options(
	# shut up a lot of warnings in WTF
	-Wno-gcc-compat
	-Wno-implicit-int-float-conversion

	-fmessage-length=0
	-fdiagnostics-show-note-include-stack
	-fmacro-backtrace-limit=0
	-gmodules
	-Wno-trigraphs
	-fno-exceptions
	-fno-rtti
	-fno-sanitize=vptr
	-fpascal-strings
	-O3
	-fno-common
	-fasm-blocks
	-fstrict-aliasing
	-Winvalid-offsetof
	-g
	-fvisibility=hidden
	-fvisibility-inlines-hidden
	-fno-threadsafe-statics
	--system-header-prefix=unicode/
)

# JavaScriptCore now has support for "unified" builds (and Apple uses them)
# these can *significantly* speed up builds (usually 2x as fast)
# however, they also require more RAM, especially when doing parallel builds
# therefore, we disable them by default
if(JSC_UNIFIED_BUILD)
	set(JSC_SOURCES
		# actual unified sources
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource1-mm.mm
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource1.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource2-mm.mm
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource2.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource3-mm.mm
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource3.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource4-mm.mm
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource4.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource5-mm.mm
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource5.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource6.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource7.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource8.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource9.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource10.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource11.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource12.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource13.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource14.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource15.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource16.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource17.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource18.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource19.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource20.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource21.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource22.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource23.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource24.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource25.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource26.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource27.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource28.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource29.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource30.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource31.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource32.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource33.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource34.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource35.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource36.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource37.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource38.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource39.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource40.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource41.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource42.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource43.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource44.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource45.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource46.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource47.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource48.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource49.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource50.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource51.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource52.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource53.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource54.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource55.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource56.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource57.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource58.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource59.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource60.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource61.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource62.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource63.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource64.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource65.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource66.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource67.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource68.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource69.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource70.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource71.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource72.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource73.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource74.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource75.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource76.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource77.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource78.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource79.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource80.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource81.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource82.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource83.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource84.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource85.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource86.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource87.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource88.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource89.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource90.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource91.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource92.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource93.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource94.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource95.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource96.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource97.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource98.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource99.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource100.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource101.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource102.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource103.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource104.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource105.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource106.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource107.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource108.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource109.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource110.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource111.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource112.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource113.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource114.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource115.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource116.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource117.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource118.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource119.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource120.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource121.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource122.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource123.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource124.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource125.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource126.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource127.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource128.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource129.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource130.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource131.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource132.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource133.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource134.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource135.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource136.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource137.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource138.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource139.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource140.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource141.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource142.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource143.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource144.cpp
		DerivedSources/JavaScriptCore/unified-sources/UnifiedSource145.cpp
	)
else()
	set(JSC_SOURCES
		DerivedSources/JavaScriptCore/JSCBuiltins.cpp
		DerivedSources/JavaScriptCore/inspector/InspectorBackendDispatchers.cpp
		DerivedSources/JavaScriptCore/inspector/InspectorFrontendDispatchers.cpp
		DerivedSources/JavaScriptCore/inspector/InspectorProtocolObjects.cpp
		DerivedSources/JavaScriptCore/yarr/YarrCanonicalizeUnicode.cpp
		
		API/JSAPIGlobalObject.cpp
		API/JSAPIGlobalObject.mm
		API/JSAPIValueWrapper.cpp
		API/JSAPIWrapperObject.mm
		API/JSBase.cpp
		API/JSCallbackConstructor.cpp
		API/JSCallbackFunction.cpp
		API/JSCallbackObject.cpp
		API/JSClassRef.cpp
		API/JSContext.mm
		API/JSContextRef.cpp
		API/JSCTestRunnerUtils.cpp
		API/JSHeapFinalizerPrivate.cpp
		API/JSManagedValue.mm
		API/JSMarkingConstraintPrivate.cpp
		API/JSObjectRef.cpp
		API/JSRemoteInspector.cpp
		API/JSScript.mm
		API/JSScriptRef.cpp
		API/JSScriptSourceProvider.mm
		API/JSStringRef.cpp
		API/JSStringRefCF.cpp
		API/JSTypedArray.cpp
		API/JSValue.mm
		API/JSValueRef.cpp
		API/JSVirtualMachine.mm
		API/JSWeakObjectMapRefPrivate.cpp
		API/JSWeakPrivate.cpp
		API/JSWeakValue.cpp
		API/JSWrapperMap.mm
		API/ObjCCallbackFunction.mm
		API/OpaqueJSString.cpp

		assembler/AbstractMacroAssembler.cpp
		assembler/CPU.cpp
		assembler/LinkBuffer.cpp
		assembler/MacroAssembler.cpp
		assembler/MacroAssemblerARM64.cpp
		assembler/MacroAssemblerARMv7.cpp
		assembler/MacroAssemblerCodeRef.cpp
		assembler/MacroAssemblerMIPS.cpp
		assembler/MacroAssemblerPrinter.cpp
		assembler/MacroAssemblerX86Common.cpp
		assembler/PerfLog.cpp
		assembler/Printer.cpp
		assembler/ProbeContext.cpp
		assembler/ProbeStack.cpp

		b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp
		b3/air/AirAllocateRegistersAndStackByLinearScan.cpp
		b3/air/AirAllocateRegistersByGraphColoring.cpp
		b3/air/AirAllocateStackByGraphColoring.cpp
		b3/air/AirArg.cpp
		b3/air/AirBasicBlock.cpp
		b3/air/AirBlockInsertionSet.cpp
		b3/air/AirBreakCriticalEdges.cpp
		b3/air/AirCCallingConvention.cpp
		b3/air/AirCCallSpecial.cpp
		b3/air/AirCode.cpp
		b3/air/AirCustom.cpp
		b3/air/AirDisassembler.cpp
		b3/air/AirEliminateDeadCode.cpp
		b3/air/AirEmitShuffle.cpp
		b3/air/AirFixObviousSpills.cpp
		b3/air/AirFixPartialRegisterStalls.cpp
		b3/air/AirFixSpillsAfterTerminals.cpp
		b3/air/AirGenerate.cpp
		b3/air/AirGenerated.cpp
		b3/air/AirHandleCalleeSaves.cpp
		b3/air/AirInsertionSet.cpp
		b3/air/AirInst.cpp
		b3/air/AirKind.cpp
		b3/air/AirLogRegisterPressure.cpp
		b3/air/AirLowerAfterRegAlloc.cpp
		b3/air/AirLowerEntrySwitch.cpp
		b3/air/AirLowerMacros.cpp
		b3/air/AirLowerStackArgs.cpp
		b3/air/AirOptimizeBlockOrder.cpp
		b3/air/AirPadInterference.cpp
		b3/air/AirPhaseInsertionSet.cpp
		b3/air/AirPhaseScope.cpp
		b3/air/AirPrintSpecial.cpp
		b3/air/AirRegLiveness.cpp
		b3/air/AirReportUsedRegisters.cpp
		b3/air/AirSimplifyCFG.cpp
		b3/air/AirSpecial.cpp
		b3/air/AirStackAllocation.cpp
		b3/air/AirStackSlot.cpp
		b3/air/AirStackSlotKind.cpp
		b3/air/AirTmp.cpp
		b3/air/AirTmpWidth.cpp
		b3/air/AirValidate.cpp

		b3/B3ArgumentRegValue.cpp
		b3/B3AtomicValue.cpp
		b3/B3Bank.cpp
		b3/B3BasicBlock.cpp
		b3/B3BlockInsertionSet.cpp
		b3/B3BreakCriticalEdges.cpp
		b3/B3CaseCollection.cpp
		b3/B3CCallValue.cpp
		b3/B3CheckSpecial.cpp
		b3/B3CheckValue.cpp
		b3/B3Common.cpp
		b3/B3Commutativity.cpp
		b3/B3Compilation.cpp
		b3/B3Compile.cpp
		b3/B3Const32Value.cpp
		b3/B3Const64Value.cpp
		b3/B3ConstDoubleValue.cpp
		b3/B3ConstFloatValue.cpp
		b3/B3ConstrainedValue.cpp
		b3/B3DataSection.cpp
		b3/B3DuplicateTails.cpp
		b3/B3Effects.cpp
		b3/B3EliminateCommonSubexpressions.cpp
		b3/B3EliminateDeadCode.cpp
		b3/B3EnsureLoopPreHeaders.cpp
		b3/B3FenceValue.cpp
		b3/B3FixSSA.cpp
		b3/B3FoldPathConstants.cpp
		b3/B3FrequencyClass.cpp
		b3/B3Generate.cpp
		b3/B3HoistLoopInvariantValues.cpp
		b3/B3InferSwitches.cpp
		b3/B3InsertionSet.cpp
		b3/B3Kind.cpp
		b3/B3LegalizeMemoryOffsets.cpp
		b3/B3LowerMacros.cpp
		b3/B3LowerMacrosAfterOptimizations.cpp
		b3/B3LowerToAir.cpp
		b3/B3MathExtras.cpp
		b3/B3MemoryValue.cpp
		b3/B3MoveConstants.cpp
		b3/B3OpaqueByproducts.cpp
		b3/B3Opcode.cpp
		b3/B3OptimizeAssociativeExpressionTrees.cpp
		b3/B3Origin.cpp
		b3/B3OriginDump.cpp
		b3/B3PatchpointSpecial.cpp
		b3/B3PatchpointValue.cpp
		b3/B3PhaseScope.cpp
		b3/B3PhiChildren.cpp
		b3/B3Procedure.cpp
		b3/B3PureCSE.cpp
		b3/B3ReduceDoubleToFloat.cpp
		b3/B3ReduceStrength.cpp
		b3/B3SlotBaseValue.cpp
		b3/B3SSACalculator.cpp
		b3/B3StackmapGenerationParams.cpp
		b3/B3StackmapSpecial.cpp
		b3/B3StackmapValue.cpp
		b3/B3StackSlot.cpp
		b3/B3SwitchCase.cpp
		b3/B3SwitchValue.cpp
		b3/B3Type.cpp
		b3/B3UpsilonValue.cpp
		b3/B3UseCounts.cpp
		b3/B3Validate.cpp
		b3/B3Value.cpp
		b3/B3ValueKey.cpp
		b3/B3ValueRep.cpp
		b3/B3Variable.cpp
		b3/B3VariableLiveness.cpp
		b3/B3VariableValue.cpp
		b3/B3WasmAddressValue.cpp
		b3/B3WasmBoundsCheckValue.cpp
		b3/B3Width.cpp

		bindings/ScriptFunctionCall.cpp
		bindings/ScriptObject.cpp
		bindings/ScriptValue.cpp

		builtins/BuiltinExecutableCreator.cpp
		builtins/BuiltinExecutables.cpp
		builtins/BuiltinNames.cpp

		bytecode/AccessCase.cpp
		bytecode/AccessCaseSnippetParams.cpp
		bytecode/AdaptiveInferredPropertyValueWatchpointBase.cpp
		bytecode/ArithProfile.cpp
		bytecode/ArrayAllocationProfile.cpp
		bytecode/ArrayProfile.cpp
		bytecode/BytecodeBasicBlock.cpp
		bytecode/BytecodeDumper.cpp
		bytecode/BytecodeGeneratorification.cpp
		bytecode/BytecodeIntrinsicRegistry.cpp
		bytecode/BytecodeLivenessAnalysis.cpp
		bytecode/BytecodeRewriter.cpp
		bytecode/CallEdge.cpp
		bytecode/CallLinkInfo.cpp
		bytecode/CallLinkStatus.cpp
		bytecode/CallMode.cpp
		bytecode/CallVariant.cpp
		bytecode/CodeBlock.cpp
		bytecode/CodeBlockHash.cpp
		bytecode/CodeBlockJettisoningWatchpoint.cpp
		bytecode/CodeOrigin.cpp
		bytecode/CodeType.cpp
		bytecode/ComplexGetStatus.cpp
		bytecode/DataFormat.cpp
		bytecode/DeferredCompilationCallback.cpp
		bytecode/DeferredSourceDump.cpp
		bytecode/DFGExitProfile.cpp
		bytecode/DirectEvalCodeCache.cpp
		bytecode/EvalCodeBlock.cpp
		bytecode/ExecutableToCodeBlockEdge.cpp
		bytecode/ExecutionCounter.cpp
		bytecode/ExitFlag.cpp
		bytecode/ExitingInlineKind.cpp
		bytecode/ExitingJITType.cpp
		bytecode/ExitKind.cpp
		bytecode/FullCodeOrigin.cpp
		bytecode/FunctionCodeBlock.cpp
		bytecode/GetByIdStatus.cpp
		bytecode/GetByIdVariant.cpp
		bytecode/GetterSetterAccessCase.cpp
		bytecode/ICStatusMap.cpp
		bytecode/ICStatusUtils.cpp
		bytecode/InByIdStatus.cpp
		bytecode/InByIdVariant.cpp
		bytecode/InlineAccess.cpp
		bytecode/InlineCallFrame.cpp
		bytecode/InlineCallFrameSet.cpp
		bytecode/InstanceOfAccessCase.cpp
		bytecode/InstanceOfStatus.cpp
		bytecode/InstanceOfVariant.cpp
		bytecode/InstructionStream.cpp
		bytecode/IntrinsicGetterAccessCase.cpp
		bytecode/JumpTable.cpp
		bytecode/LazyOperandValueProfile.cpp
		bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp
		bytecode/MetadataTable.cpp
		bytecode/MethodOfGettingAValueProfile.cpp
		bytecode/ModuleNamespaceAccessCase.cpp
		bytecode/ModuleProgramCodeBlock.cpp
		bytecode/ObjectPropertyCondition.cpp
		bytecode/ObjectPropertyConditionSet.cpp
		bytecode/Opcode.cpp
		bytecode/ParseHash.cpp
		bytecode/PolymorphicAccess.cpp
		bytecode/PolyProtoAccessChain.cpp
		bytecode/PreciseJumpTargets.cpp
		bytecode/ProgramCodeBlock.cpp
		bytecode/PropertyCondition.cpp
		bytecode/ProxyableAccessCase.cpp
		bytecode/PutByIdFlags.cpp
		bytecode/PutByIdStatus.cpp
		bytecode/PutByIdVariant.cpp
		bytecode/RecordedStatuses.cpp
		bytecode/ReduceWhitespace.cpp
		bytecode/SpecialPointer.cpp
		bytecode/SpeculatedType.cpp
		bytecode/StructureSet.cpp
		bytecode/StructureStubClearingWatchpoint.cpp
		bytecode/StructureStubInfo.cpp
		bytecode/StubInfoSummary.cpp
		bytecode/SuperSampler.cpp
		bytecode/ToThisStatus.cpp
		bytecode/TrackedReferences.cpp
		bytecode/UnlinkedCodeBlock.cpp
		bytecode/UnlinkedEvalCodeBlock.cpp
		bytecode/UnlinkedFunctionCodeBlock.cpp
		bytecode/UnlinkedFunctionExecutable.cpp
		bytecode/UnlinkedMetadataTable.cpp
		bytecode/UnlinkedModuleProgramCodeBlock.cpp
		bytecode/UnlinkedProgramCodeBlock.cpp
		bytecode/ValueRecovery.cpp
		bytecode/VariableWriteFireDetail.cpp
		bytecode/VirtualRegister.cpp
		bytecode/Watchpoint.cpp

		bytecompiler/BytecodeGenerator.cpp
		bytecompiler/NodesCodegen.cpp
		bytecompiler/ProfileTypeBytecodeFlag.cpp

		debugger/Debugger.cpp
		debugger/DebuggerCallFrame.cpp
		debugger/DebuggerLocation.cpp
		debugger/DebuggerParseData.cpp
		debugger/DebuggerScope.cpp

		dfg/DFGAbstractHeap.cpp
		dfg/DFGAbstractInterpreterClobberState.cpp
		dfg/DFGAbstractValue.cpp
		dfg/DFGAbstractValueClobberEpoch.cpp
		dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp
		dfg/DFGAdaptiveStructureWatchpoint.cpp
		dfg/DFGArgumentsEliminationPhase.cpp
		dfg/DFGArgumentsUtilities.cpp
		dfg/DFGArithMode.cpp
		dfg/DFGArrayMode.cpp
		dfg/DFGAtTailAbstractState.cpp
		dfg/DFGAvailability.cpp
		dfg/DFGAvailabilityMap.cpp
		dfg/DFGBackwardsPropagationPhase.cpp
		dfg/DFGBasicBlock.cpp
		dfg/DFGBlockInsertionSet.cpp
		dfg/DFGBlockSet.cpp
		dfg/DFGByteCodeParser.cpp
		dfg/DFGCapabilities.cpp
		dfg/DFGCFAPhase.cpp
		dfg/DFGCFGSimplificationPhase.cpp
		dfg/DFGCleanUpPhase.cpp
		dfg/DFGClobberize.cpp
		dfg/DFGClobberSet.cpp
		dfg/DFGClobbersExitState.cpp
		dfg/DFGCombinedLiveness.cpp
		dfg/DFGCommon.cpp
		dfg/DFGCommonData.cpp
		dfg/DFGCompilationKey.cpp
		dfg/DFGCompilationMode.cpp
		dfg/DFGConstantFoldingPhase.cpp
		dfg/DFGConstantHoistingPhase.cpp
		dfg/DFGCPSRethreadingPhase.cpp
		dfg/DFGCriticalEdgeBreakingPhase.cpp
		dfg/DFGCSEPhase.cpp
		dfg/DFGDCEPhase.cpp
		dfg/DFGDesiredGlobalProperties.cpp
		dfg/DFGDesiredIdentifiers.cpp
		dfg/DFGDesiredTransitions.cpp
		dfg/DFGDesiredWatchpoints.cpp
		dfg/DFGDesiredWeakReferences.cpp
		dfg/DFGDisassembler.cpp
		dfg/DFGDoesGC.cpp
		dfg/DFGDriver.cpp
		dfg/DFGEdge.cpp
		dfg/DFGEpoch.cpp
		dfg/DFGFailedFinalizer.cpp
		dfg/DFGFinalizer.cpp
		dfg/DFGFixupPhase.cpp
		dfg/DFGFlowIndexing.cpp
		dfg/DFGFlushedAt.cpp
		dfg/DFGFlushFormat.cpp
		dfg/DFGFrozenValue.cpp
		dfg/DFGGraph.cpp
		dfg/DFGGraphSafepoint.cpp
		dfg/DFGHeapLocation.cpp
		dfg/DFGInPlaceAbstractState.cpp
		dfg/DFGInsertionSet.cpp
		dfg/DFGIntegerCheckCombiningPhase.cpp
		dfg/DFGIntegerRangeOptimizationPhase.cpp
		dfg/DFGInvalidationPointInjectionPhase.cpp
		dfg/DFGJITCode.cpp
		dfg/DFGJITCompiler.cpp
		dfg/DFGJITFinalizer.cpp
		dfg/DFGJumpReplacement.cpp
		dfg/DFGLazyJSValue.cpp
		dfg/DFGLazyNode.cpp
		dfg/DFGLICMPhase.cpp
		dfg/DFGLiveCatchVariablePreservationPhase.cpp
		dfg/DFGLivenessAnalysisPhase.cpp
		dfg/DFGLoopPreHeaderCreationPhase.cpp
		dfg/DFGMaximalFlushInsertionPhase.cpp
		dfg/DFGMayExit.cpp
		dfg/DFGMinifiedGraph.cpp
		dfg/DFGMinifiedNode.cpp
		dfg/DFGMovHintRemovalPhase.cpp
		dfg/DFGMultiGetByOffsetData.cpp
		dfg/DFGNode.cpp
		dfg/DFGNodeAbstractValuePair.cpp
		dfg/DFGNodeFlags.cpp
		dfg/DFGNodeFlowProjection.cpp
		dfg/DFGNodeOrigin.cpp
		dfg/DFGObjectAllocationSinkingPhase.cpp
		dfg/DFGObjectMaterializationData.cpp
		dfg/DFGOperations.cpp
		dfg/DFGOSRAvailabilityAnalysisPhase.cpp
		dfg/DFGOSREntry.cpp
		dfg/DFGOSREntrypointCreationPhase.cpp
		dfg/DFGOSRExit.cpp
		dfg/DFGOSRExitBase.cpp
		dfg/DFGOSRExitCompilerCommon.cpp
		dfg/DFGOSRExitFuzz.cpp
		dfg/DFGOSRExitJumpPlaceholder.cpp
		dfg/DFGOSRExitPreparation.cpp
		dfg/DFGPhantomInsertionPhase.cpp
		dfg/DFGPhase.cpp
		dfg/DFGPhiChildren.cpp
		dfg/DFGPlan.cpp
		dfg/DFGPredictionInjectionPhase.cpp
		dfg/DFGPredictionPropagationPhase.cpp
		dfg/DFGPromotedHeapLocation.cpp
		dfg/DFGPureValue.cpp
		dfg/DFGPutStackSinkingPhase.cpp
		dfg/DFGRegisteredStructureSet.cpp
		dfg/DFGSafepoint.cpp
		dfg/DFGSnippetParams.cpp
		dfg/DFGSSACalculator.cpp
		dfg/DFGSSAConversionPhase.cpp
		dfg/DFGSSALoweringPhase.cpp
		dfg/DFGStackLayoutPhase.cpp
		dfg/DFGStaticExecutionCountEstimationPhase.cpp
		dfg/DFGStoreBarrierClusteringPhase.cpp
		dfg/DFGStoreBarrierInsertionPhase.cpp
		dfg/DFGStrengthReductionPhase.cpp
		dfg/DFGStructureAbstractValue.cpp
		dfg/DFGThreadData.cpp
		dfg/DFGThunks.cpp
		dfg/DFGTierUpCheckInjectionPhase.cpp
		dfg/DFGToFTLDeferredCompilationCallback.cpp
		dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp
		dfg/DFGTransition.cpp
		dfg/DFGTypeCheckHoistingPhase.cpp
		dfg/DFGUnificationPhase.cpp
		dfg/DFGUseKind.cpp
		dfg/DFGValidate.cpp
		dfg/DFGValueRepReductionPhase.cpp
		dfg/DFGValueSource.cpp
		dfg/DFGValueStrength.cpp
		dfg/DFGVarargsForwardingPhase.cpp
		dfg/DFGVariableAccessData.cpp
		dfg/DFGVariableAccessDataDump.cpp
		dfg/DFGVariableEvent.cpp
		dfg/DFGVariableEventStream.cpp
		dfg/DFGVirtualRegisterAllocationPhase.cpp
		dfg/DFGWatchpointCollectionPhase.cpp
		dfg/DFGWorklist.cpp

		disassembler/ARM64/A64DOpcode.cpp

		disassembler/ARM64Disassembler.cpp
		disassembler/CapstoneDisassembler.cpp
		disassembler/Disassembler.cpp
		disassembler/UDis86Disassembler.cpp
		disassembler/X86Disassembler.cpp

		domjit/DOMJITAbstractHeap.cpp
		domjit/DOMJITHeapRange.cpp

		ftl/FTLAbstractHeap.cpp
		ftl/FTLAbstractHeapRepository.cpp
		ftl/FTLAvailableRecovery.cpp
		ftl/FTLCapabilities.cpp
		ftl/FTLCommonValues.cpp
		ftl/FTLCompile.cpp
		ftl/FTLExceptionTarget.cpp
		ftl/FTLExitArgument.cpp
		ftl/FTLExitArgumentForOperand.cpp
		ftl/FTLExitPropertyValue.cpp
		ftl/FTLExitTimeObjectMaterialization.cpp
		ftl/FTLExitValue.cpp
		ftl/FTLFail.cpp
		ftl/FTLForOSREntryJITCode.cpp
		ftl/FTLJITCode.cpp
		ftl/FTLJITFinalizer.cpp
		ftl/FTLLazySlowPath.cpp
		ftl/FTLLink.cpp
		ftl/FTLLocation.cpp
		ftl/FTLOperations.cpp
		ftl/FTLOSREntry.cpp
		ftl/FTLOSRExit.cpp
		ftl/FTLOSRExitCompiler.cpp
		ftl/FTLOSRExitHandle.cpp
		ftl/FTLOutput.cpp
		ftl/FTLPatchpointExceptionHandle.cpp
		ftl/FTLRecoveryOpcode.cpp
		ftl/FTLSaveRestore.cpp
		ftl/FTLSlowPathCall.cpp
		ftl/FTLSlowPathCallKey.cpp
		ftl/FTLSnippetParams.cpp
		ftl/FTLState.cpp
		ftl/FTLThunks.cpp
		ftl/FTLValueRange.cpp

		heap/AlignedMemoryAllocator.cpp
		heap/Allocator.cpp
		heap/BlockDirectory.cpp
		heap/CellAttributes.cpp
		heap/CellContainer.cpp
		heap/CodeBlockSet.cpp
		heap/CollectionScope.cpp
		heap/CollectorPhase.cpp
		heap/CompleteSubspace.cpp
		heap/ConservativeRoots.cpp
		heap/DeferGC.cpp
		heap/DestructionMode.cpp
		heap/EdenGCActivityCallback.cpp
		heap/FastMallocAlignedMemoryAllocator.cpp
		heap/FreeList.cpp
		heap/FullGCActivityCallback.cpp
		heap/GCActivityCallback.cpp
		heap/GCConductor.cpp
		heap/GCLogging.cpp
		heap/GCRequest.cpp
		heap/GigacageAlignedMemoryAllocator.cpp
		heap/HandleSet.cpp
		heap/Heap.cpp
		heap/HeapCell.cpp
		heap/HeapCellType.cpp
		heap/HeapFinalizerCallback.cpp
		heap/HeapHelperPool.cpp
		heap/HeapProfiler.cpp
		heap/HeapSnapshot.cpp
		heap/HeapSnapshotBuilder.cpp
		heap/IncrementalSweeper.cpp
		heap/IsoAlignedMemoryAllocator.cpp
		heap/IsoCellSet.cpp
		heap/IsoSubspace.cpp
		heap/IsoSubspacePerVM.cpp
		heap/JITStubRoutineSet.cpp
		heap/LargeAllocation.cpp
		heap/LocalAllocator.cpp
		heap/MachineStackMarker.cpp
		heap/MarkedBlock.cpp
		heap/MarkedSpace.cpp
		heap/MarkingConstraint.cpp
		heap/MarkingConstraintSet.cpp
		heap/MarkingConstraintSolver.cpp
		heap/MarkStack.cpp
		heap/MarkStackMergingConstraint.cpp
		heap/MutatorScheduler.cpp
		heap/MutatorState.cpp
		heap/SimpleMarkingConstraint.cpp
		heap/SlotVisitor.cpp
		heap/SpaceTimeMutatorScheduler.cpp
		heap/StochasticSpaceTimeMutatorScheduler.cpp
		heap/StopIfNecessaryTimer.cpp
		heap/Subspace.cpp
		heap/Synchronousness.cpp
		heap/SynchronousStopTheWorldMutatorScheduler.cpp
		heap/VisitRaceKey.cpp
		heap/Weak.cpp
		heap/WeakBlock.cpp
		heap/WeakHandleOwner.cpp
		heap/WeakSet.cpp
		heap/WriteBarrierSupport.cpp

		inspector/agents/InspectorAgent.cpp
		inspector/agents/InspectorAuditAgent.cpp
		inspector/agents/InspectorConsoleAgent.cpp
		inspector/agents/InspectorDebuggerAgent.cpp
		inspector/agents/InspectorHeapAgent.cpp
		inspector/agents/InspectorRuntimeAgent.cpp
		inspector/agents/InspectorScriptProfilerAgent.cpp
		inspector/agents/InspectorTargetAgent.cpp
		inspector/agents/JSGlobalObjectAuditAgent.cpp
		inspector/agents/JSGlobalObjectDebuggerAgent.cpp
		inspector/agents/JSGlobalObjectRuntimeAgent.cpp

		inspector/AsyncStackTrace.cpp
		inspector/ConsoleMessage.cpp
		inspector/ContentSearchUtilities.cpp
		inspector/EventLoop.cpp
		inspector/IdentifiersFactory.cpp
		inspector/InjectedScript.cpp
		inspector/InjectedScriptBase.cpp
		inspector/InjectedScriptHost.cpp
		inspector/InjectedScriptManager.cpp
		inspector/InjectedScriptModule.cpp
		inspector/InspectorAgentRegistry.cpp
		inspector/InspectorBackendDispatcher.cpp
		inspector/InspectorFrontendRouter.cpp
		inspector/JavaScriptCallFrame.cpp
		inspector/JSGlobalObjectConsoleClient.cpp
		inspector/JSGlobalObjectInspectorController.cpp
		inspector/JSGlobalObjectScriptDebugServer.cpp
		inspector/JSInjectedScriptHost.cpp
		inspector/JSInjectedScriptHostPrototype.cpp
		inspector/JSJavaScriptCallFrame.cpp
		inspector/JSJavaScriptCallFramePrototype.cpp
		inspector/PerGlobalObjectWrapperWorld.cpp

		inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm
		inspector/remote/cocoa/RemoteInspectorCocoa.mm
		inspector/remote/cocoa/RemoteInspectorXPCConnection.mm

		inspector/remote/RemoteAutomationTarget.cpp
		inspector/remote/RemoteControllableTarget.cpp
		inspector/remote/RemoteInspectionTarget.cpp
		inspector/remote/RemoteInspector.cpp

		inspector/ScriptArguments.cpp
		inspector/ScriptCallFrame.cpp
		inspector/ScriptCallStack.cpp
		inspector/ScriptCallStackFactory.cpp
		inspector/ScriptDebugServer.cpp

		interpreter/AbstractPC.cpp
		interpreter/CallFrame.cpp
		interpreter/CLoopStack.cpp
		interpreter/Interpreter.cpp
		interpreter/ShadowChicken.cpp
		interpreter/StackVisitor.cpp

		jit/AssemblyHelpers.cpp
		jit/BinarySwitch.cpp
		jit/CachedRecovery.cpp
		jit/CallFrameShuffleData.cpp
		jit/CallFrameShuffler.cpp
		jit/CallFrameShuffler32_64.cpp
		jit/CallFrameShuffler64.cpp
		jit/CCallHelpers.cpp
		jit/ExecutableAllocationFuzz.cpp
		jit/ExecutableAllocator.cpp
		jit/GCAwareJITStubRoutine.cpp
		jit/GPRInfo.cpp
		jit/HostCallReturnValue.cpp
		jit/ICStats.cpp
		jit/IntrinsicEmitter.cpp
		jit/JIT.cpp
		jit/JITAddGenerator.cpp
		jit/JITArithmetic.cpp
		jit/JITArithmetic32_64.cpp
		jit/JITBitAndGenerator.cpp
		jit/JITBitOrGenerator.cpp
		jit/JITBitXorGenerator.cpp
		jit/JITCall.cpp
		jit/JITCall32_64.cpp
		jit/JITCode.cpp
		jit/JITDisassembler.cpp
		jit/JITDivGenerator.cpp
		jit/JITExceptions.cpp
		jit/JITInlineCacheGenerator.cpp
		jit/JITLeftShiftGenerator.cpp
		jit/JITMulGenerator.cpp
		jit/JITNegGenerator.cpp
		jit/JITOpcodes.cpp
		jit/JITOpcodes32_64.cpp
		jit/JITOperations.cpp
		jit/JITPropertyAccess.cpp
		jit/JITPropertyAccess32_64.cpp
		jit/JITRightShiftGenerator.cpp
		jit/JITStubRoutine.cpp
		jit/JITSubGenerator.cpp
		jit/JITThunks.cpp
		jit/JITToDFGDeferredCompilationCallback.cpp
		jit/JITWorklist.cpp
		jit/PCToCodeOriginMap.cpp
		jit/PolymorphicCallStubRoutine.cpp
		jit/Reg.cpp
		jit/RegisterAtOffset.cpp
		jit/RegisterAtOffsetList.cpp
		jit/RegisterSet.cpp
		jit/Repatch.cpp
		jit/ScratchRegisterAllocator.cpp
		jit/SetupVarargsFrame.cpp
		jit/TagRegistersMode.cpp
		jit/TempRegisterSet.cpp
		jit/ThunkGenerators.cpp

		llint/LLIntCLoop.cpp
		llint/LLIntData.cpp
		llint/LLIntEntrypoint.cpp
		llint/LLIntExceptions.cpp
		llint/LLIntSlowPaths.cpp
		llint/LLIntThunks.cpp

		parser/Lexer.cpp
		parser/ModuleAnalyzer.cpp
		parser/Nodes.cpp
		parser/NodesAnalyzeModule.cpp
		parser/Parser.cpp
		parser/ParserArena.cpp
		parser/SourceProvider.cpp
		parser/SourceProviderCache.cpp
		parser/UnlinkedSourceCode.cpp
		parser/VariableEnvironment.cpp

		profiler/ProfilerBytecode.cpp
		profiler/ProfilerBytecodes.cpp
		profiler/ProfilerBytecodeSequence.cpp
		profiler/ProfilerCompilation.cpp
		profiler/ProfilerCompilationKind.cpp
		profiler/ProfilerCompiledBytecode.cpp
		profiler/ProfilerDatabase.cpp
		profiler/ProfilerEvent.cpp
		profiler/ProfilerJettisonReason.cpp
		profiler/ProfilerOrigin.cpp
		profiler/ProfilerOriginStack.cpp
		profiler/ProfilerOSRExit.cpp
		profiler/ProfilerOSRExitSite.cpp
		profiler/ProfilerProfiledBytecodes.cpp
		profiler/ProfilerUID.cpp

		runtime/AbstractModuleRecord.cpp
		runtime/ArgList.cpp
		runtime/ArrayBuffer.cpp
		runtime/ArrayBufferNeuteringWatchpointSet.cpp
		runtime/ArrayBufferView.cpp
		runtime/ArrayConstructor.cpp
		runtime/ArrayConventions.cpp
		runtime/ArrayIteratorPrototype.cpp
		runtime/ArrayPrototype.cpp
		runtime/AsyncFromSyncIteratorPrototype.cpp
		runtime/AsyncFunctionConstructor.cpp
		runtime/AsyncFunctionPrototype.cpp
		runtime/AsyncGeneratorFunctionConstructor.cpp
		runtime/AsyncGeneratorFunctionPrototype.cpp
		runtime/AsyncGeneratorPrototype.cpp
		runtime/AsyncIteratorPrototype.cpp
		runtime/AtomicsObject.cpp
		runtime/BasicBlockLocation.cpp
		runtime/BigIntConstructor.cpp
		runtime/BigIntObject.cpp
		runtime/BigIntPrototype.cpp
		runtime/BooleanConstructor.cpp
		runtime/BooleanObject.cpp
		runtime/BooleanPrototype.cpp
		runtime/BytecodeCacheError.cpp
		runtime/CachedBytecode.cpp
		runtime/CachedTypes.cpp
		runtime/CachePayload.cpp
		runtime/CacheUpdate.cpp
		runtime/CallData.cpp
		runtime/CatchScope.cpp
		runtime/ClassInfo.cpp
		runtime/ClonedArguments.cpp
		runtime/CodeCache.cpp
		runtime/CodeSpecializationKind.cpp
		runtime/CommonIdentifiers.cpp
		runtime/CommonSlowPaths.cpp
		runtime/CompilationResult.cpp
		runtime/Completion.cpp
		runtime/ConfigFile.cpp
		runtime/ConsoleClient.cpp
		runtime/ConsoleObject.cpp
		runtime/ConstantMode.cpp
		runtime/ConstructData.cpp
		runtime/ControlFlowProfiler.cpp
		runtime/CustomGetterSetter.cpp
		runtime/DataView.cpp
		runtime/DateConstructor.cpp
		runtime/DateConversion.cpp
		runtime/DateInstance.cpp
		runtime/DatePrototype.cpp
		runtime/DirectArguments.cpp
		runtime/DirectArgumentsOffset.cpp
		runtime/DirectEvalExecutable.cpp
		runtime/DisallowVMReentry.cpp
		runtime/DOMAttributeGetterSetter.cpp
		runtime/DoublePredictionFuzzerAgent.cpp
		runtime/DumpContext.cpp
		runtime/ECMAScriptSpecInternalFunctions.cpp
		runtime/Error.cpp
		runtime/ErrorConstructor.cpp
		runtime/ErrorHandlingScope.cpp
		runtime/ErrorInstance.cpp
		runtime/ErrorPrototype.cpp
		runtime/ErrorType.cpp
		runtime/EvalExecutable.cpp
		runtime/Exception.cpp
		runtime/ExceptionEventLocation.cpp
		runtime/ExceptionFuzz.cpp
		runtime/ExceptionHelpers.cpp
		runtime/ExceptionScope.cpp
		runtime/ExecutableBase.cpp
		runtime/FunctionConstructor.cpp
		runtime/FunctionExecutable.cpp
		runtime/FunctionExecutableDump.cpp
		runtime/FunctionHasExecutedCache.cpp
		runtime/FunctionPrototype.cpp
		runtime/FunctionRareData.cpp
		runtime/FuzzerAgent.cpp
		runtime/GeneratorFunctionConstructor.cpp
		runtime/GeneratorFunctionPrototype.cpp
		runtime/GeneratorPrototype.cpp
		runtime/GetPutInfo.cpp
		runtime/GetterSetter.cpp
		runtime/GlobalExecutable.cpp
		runtime/HashMapImpl.cpp
		runtime/Identifier.cpp
		runtime/IndexingType.cpp
		runtime/IndirectEvalExecutable.cpp
		runtime/InitializeThreading.cpp
		runtime/InspectorInstrumentationObject.cpp
		runtime/InternalFunction.cpp
		runtime/IntlCollator.cpp
		runtime/IntlCollatorConstructor.cpp
		runtime/IntlCollatorPrototype.cpp
		runtime/IntlDateTimeFormat.cpp
		runtime/IntlDateTimeFormatConstructor.cpp
		runtime/IntlDateTimeFormatPrototype.cpp
		runtime/IntlNumberFormat.cpp
		runtime/IntlNumberFormatConstructor.cpp
		runtime/IntlNumberFormatPrototype.cpp
		runtime/IntlObject.cpp
		runtime/IntlPluralRules.cpp
		runtime/IntlPluralRulesConstructor.cpp
		runtime/IntlPluralRulesPrototype.cpp
		runtime/Intrinsic.cpp
		runtime/IteratorOperations.cpp
		runtime/IteratorPrototype.cpp
		runtime/JSArray.cpp
		runtime/JSArrayBuffer.cpp
		runtime/JSArrayBufferConstructor.cpp
		runtime/JSArrayBufferPrototype.cpp
		runtime/JSArrayBufferView.cpp
		runtime/JSAsyncFunction.cpp
		runtime/JSAsyncGeneratorFunction.cpp
		runtime/JSBigInt.cpp
		runtime/JSBoundFunction.cpp
		runtime/JSCallee.cpp
		runtime/JSCell.cpp
		runtime/JSCJSValue.cpp
		runtime/JSCPtrTag.cpp
		runtime/JSCustomGetterSetterFunction.cpp
		runtime/JSDataView.cpp
		runtime/JSDataViewPrototype.cpp
		runtime/JSDateMath.cpp
		runtime/JSDestructibleObjectHeapCellType.cpp
		runtime/JSFixedArray.cpp
		runtime/JSFunction.cpp
		runtime/JSGeneratorFunction.cpp
		runtime/JSGlobalLexicalEnvironment.cpp
		runtime/JSGlobalObject.cpp
		runtime/JSGlobalObjectDebuggable.cpp
		runtime/JSGlobalObjectFunctions.cpp
		runtime/JSImmutableButterfly.cpp
		runtime/JSInternalPromise.cpp
		runtime/JSInternalPromiseConstructor.cpp
		runtime/JSInternalPromiseDeferred.cpp
		runtime/JSInternalPromisePrototype.cpp
		runtime/JSLexicalEnvironment.cpp
		runtime/JSLock.cpp
		runtime/JSMap.cpp
		runtime/JSMapIterator.cpp
		runtime/JSMicrotask.cpp
		runtime/JSModuleEnvironment.cpp
		runtime/JSModuleLoader.cpp
		runtime/JSModuleNamespaceObject.cpp
		runtime/JSModuleRecord.cpp
		runtime/JSNativeStdFunction.cpp
		runtime/JSNonDestructibleProxy.cpp
		runtime/JSObject.cpp
		runtime/JSONObject.cpp
		runtime/JSPromise.cpp
		runtime/JSPromiseConstructor.cpp
		runtime/JSPromiseDeferred.cpp
		runtime/JSPromisePrototype.cpp
		runtime/JSPropertyNameEnumerator.cpp
		runtime/JSProxy.cpp
		runtime/JSRunLoopTimer.cpp
		runtime/JSScope.cpp
		runtime/JSScriptFetcher.cpp
		runtime/JSScriptFetchParameters.cpp
		runtime/JSSegmentedVariableObject.cpp
		runtime/JSSet.cpp
		runtime/JSSetIterator.cpp
		runtime/JSSourceCode.cpp
		runtime/JSString.cpp
		runtime/JSStringHeapCellType.cpp
		runtime/JSStringIterator.cpp
		runtime/JSStringJoiner.cpp
		runtime/JSSymbolTableObject.cpp
		runtime/JSTemplateObjectDescriptor.cpp
		runtime/JSType.cpp
		runtime/JSTypedArrayConstructors.cpp
		runtime/JSTypedArrayPrototypes.cpp
		runtime/JSTypedArrays.cpp
		runtime/JSTypedArrayViewConstructor.cpp
		runtime/JSTypedArrayViewPrototype.cpp
		runtime/JSWeakMap.cpp
		runtime/JSWeakObjectRef.cpp
		runtime/JSWeakSet.cpp
		runtime/JSWithScope.cpp
		runtime/JSWrapperObject.cpp
		runtime/LazyClassStructure.cpp
		runtime/LeafExecutable.cpp
		runtime/LiteralParser.cpp
		runtime/Lookup.cpp
		runtime/MapConstructor.cpp
		runtime/MapIteratorPrototype.cpp
		runtime/MapPrototype.cpp
		runtime/MatchResult.cpp
		runtime/MathCommon.cpp
		runtime/MathObject.cpp
		runtime/MemoryStatistics.cpp
		runtime/ModuleProgramExecutable.cpp
		runtime/NativeErrorConstructor.cpp
		runtime/NativeErrorPrototype.cpp
		runtime/NativeExecutable.cpp
		runtime/NativeStdFunctionCell.cpp
		runtime/NullGetterFunction.cpp
		runtime/NullSetterFunction.cpp
		runtime/NumberConstructor.cpp
		runtime/NumberObject.cpp
		runtime/NumberPrototype.cpp
		runtime/ObjectConstructor.cpp
		runtime/ObjectInitializationScope.cpp
		runtime/ObjectPrototype.cpp
		runtime/ObjectToStringAdaptiveStructureWatchpoint.cpp
		runtime/Operations.cpp
		runtime/Options.cpp
		runtime/ProgramExecutable.cpp
		runtime/PromiseDeferredTimer.cpp
		runtime/PropertyDescriptor.cpp
		runtime/PropertySlot.cpp
		runtime/PropertyTable.cpp
		runtime/ProxyConstructor.cpp
		runtime/ProxyObject.cpp
		runtime/ProxyRevoke.cpp
		runtime/RandomizingFuzzerAgent.cpp
		runtime/ReflectObject.cpp
		runtime/RegExp.cpp
		runtime/RegExpCache.cpp
		runtime/RegExpCachedResult.cpp
		runtime/RegExpConstructor.cpp
		runtime/RegExpGlobalData.cpp
		runtime/RegExpMatchesArray.cpp
		runtime/RegExpObject.cpp
		runtime/RegExpPrototype.cpp
		runtime/RegExpStringIteratorPrototype.cpp
		runtime/RuntimeType.cpp
		runtime/SamplingCounter.cpp
		runtime/SamplingProfiler.cpp
		runtime/ScopedArguments.cpp
		runtime/ScopedArgumentsTable.cpp
		runtime/ScopeOffset.cpp
		runtime/ScriptExecutable.cpp
		runtime/SetConstructor.cpp
		runtime/SetIteratorPrototype.cpp
		runtime/SetPrototype.cpp
		runtime/SimpleTypedArrayController.cpp
		runtime/SmallStrings.cpp
		runtime/SparseArrayValueMap.cpp
		runtime/StackFrame.cpp
		runtime/StrictEvalActivation.cpp
		runtime/StringConstructor.cpp
		runtime/StringIteratorPrototype.cpp
		runtime/StringObject.cpp
		runtime/StringPrototype.cpp
		runtime/StringRecursionChecker.cpp
		runtime/Structure.cpp
		runtime/StructureCache.cpp
		runtime/StructureChain.cpp
		runtime/StructureIDTable.cpp
		runtime/StructureRareData.cpp
		runtime/Symbol.cpp
		runtime/SymbolConstructor.cpp
		runtime/SymbolObject.cpp
		runtime/SymbolPrototype.cpp
		runtime/SymbolTable.cpp
		runtime/TemplateObjectDescriptor.cpp
		runtime/TestRunnerUtils.cpp
		runtime/ThrowScope.cpp
		runtime/TypedArrayController.cpp
		runtime/TypedArrayType.cpp
		runtime/TypeLocationCache.cpp
		runtime/TypeofType.cpp
		runtime/TypeProfiler.cpp
		runtime/TypeProfilerLog.cpp
		runtime/TypeSet.cpp
		runtime/VarOffset.cpp
		runtime/VM.cpp
		runtime/VMEntryScope.cpp
		runtime/VMTraps.cpp
		runtime/Watchdog.cpp
		runtime/WeakMapConstructor.cpp
		runtime/WeakMapImpl.cpp
		runtime/WeakMapPrototype.cpp
		runtime/WeakObjectRefConstructor.cpp
		runtime/WeakObjectRefPrototype.cpp
		runtime/WeakSetConstructor.cpp
		runtime/WeakSetPrototype.cpp

		tools/CellList.cpp
		tools/CodeProfile.cpp
		tools/CodeProfiling.cpp
		tools/CompilerTimingScope.cpp
		tools/FunctionOverrides.cpp
		tools/FunctionWhitelist.cpp
		tools/HeapVerifier.cpp
		tools/JSDollarVM.cpp
		tools/SigillCrashAnalyzer.cpp
		tools/VMInspector.cpp

		wasm/js/JSToWasm.cpp
		wasm/js/JSToWasmICCallee.cpp
		wasm/js/JSWebAssembly.cpp
		wasm/js/JSWebAssemblyCodeBlock.cpp
		wasm/js/JSWebAssemblyCodeBlockHeapCellType.cpp
		wasm/js/JSWebAssemblyCompileError.cpp
		wasm/js/JSWebAssemblyInstance.cpp
		wasm/js/JSWebAssemblyLinkError.cpp
		wasm/js/JSWebAssemblyMemory.cpp
		wasm/js/JSWebAssemblyModule.cpp
		wasm/js/JSWebAssemblyRuntimeError.cpp
		wasm/js/JSWebAssemblyTable.cpp
		wasm/js/WasmToJS.cpp
		wasm/js/WebAssemblyCompileErrorConstructor.cpp
		wasm/js/WebAssemblyCompileErrorPrototype.cpp
		wasm/js/WebAssemblyFunction.cpp
		wasm/js/WebAssemblyFunctionBase.cpp
		wasm/js/WebAssemblyFunctionHeapCellType.cpp
		wasm/js/WebAssemblyInstanceConstructor.cpp
		wasm/js/WebAssemblyInstancePrototype.cpp
		wasm/js/WebAssemblyLinkErrorConstructor.cpp
		wasm/js/WebAssemblyLinkErrorPrototype.cpp
		wasm/js/WebAssemblyMemoryConstructor.cpp
		wasm/js/WebAssemblyMemoryPrototype.cpp
		wasm/js/WebAssemblyModuleConstructor.cpp
		wasm/js/WebAssemblyModulePrototype.cpp
		wasm/js/WebAssemblyModuleRecord.cpp
		wasm/js/WebAssemblyPrototype.cpp
		wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
		wasm/js/WebAssemblyRuntimeErrorPrototype.cpp
		wasm/js/WebAssemblyTableConstructor.cpp
		wasm/js/WebAssemblyTablePrototype.cpp
		wasm/js/WebAssemblyToJSCallee.cpp
		wasm/js/WebAssemblyWrapperFunction.cpp

		wasm/WasmB3IRGenerator.cpp
		wasm/WasmBBQPlan.cpp
		wasm/WasmBinding.cpp
		wasm/WasmCallee.cpp
		wasm/WasmCallingConvention.cpp
		wasm/WasmCodeBlock.cpp
		wasm/WasmFaultSignalHandler.cpp
		wasm/WasmFormat.cpp
		wasm/WasmIndexOrName.cpp
		wasm/WasmInstance.cpp
		wasm/WasmMachineThreads.cpp
		wasm/WasmMemory.cpp
		wasm/WasmMemoryInformation.cpp
		wasm/WasmMemoryMode.cpp
		wasm/WasmModule.cpp
		wasm/WasmModuleInformation.cpp
		wasm/WasmModuleParser.cpp
		wasm/WasmNameSectionParser.cpp
		wasm/WasmOMGPlan.cpp
		wasm/WasmOpcodeOrigin.cpp
		wasm/WasmPageCount.cpp
		wasm/WasmPlan.cpp
		wasm/WasmSectionParser.cpp
		wasm/WasmSignature.cpp
		wasm/WasmStreamingParser.cpp
		wasm/WasmTable.cpp
		wasm/WasmThunks.cpp
		wasm/WasmValidate.cpp
		wasm/WasmWorklist.cpp

		yarr/RegularExpression.cpp
		yarr/YarrCanonicalizeUCS2.cpp
		yarr/YarrDisassembler.cpp
		yarr/YarrErrorCode.cpp
		yarr/YarrFlags.cpp
		yarr/YarrInterpreter.cpp
		yarr/YarrJIT.cpp
		yarr/YarrPattern.cpp
		yarr/YarrSyntaxChecker.cpp
		yarr/YarrUnicodeProperties.cpp
	)

	# Apple *only* does "unified" builds now, so they seem to have forgotten to include what each file actually needs in updated code
	# we want to support regular un-"unified" builds in Darling, so we have to add some includes to get it to compile
	add_compile_definitions(
		DARLING_NONUNIFIED_BUILD
	)
endif()

# these sources are the same, regardless of whether unified builds are enabled or not
set(JSC_SOURCES ${JSC_SOURCES}
	dfg/DFGSpeculativeJIT.cpp
	dfg/DFGSpeculativeJIT32_64.cpp
	dfg/DFGSpeculativeJIT64.cpp

	disassembler/udis86/udis86_decode.c
	disassembler/udis86/udis86_itab_holder.c
	disassembler/udis86/udis86_syn-att.c
	disassembler/udis86/udis86_syn-intel.c
	disassembler/udis86/udis86_syn.c
	disassembler/udis86/udis86.c

	ftl/FTLLowerDFGToB3.cpp

	inspector/cocoa/DeprecatedInspectorValues.cpp
	inspector/InspectorBackendDispatcherCompatibility.cpp

	llint/LowLevelInterpreter.cpp

	wasm/WasmAirIRGenerator.cpp
)

add_framework(JavaScriptCore
	FAT
	CURRENT_VERSION
	VERSION "A"

	SOURCES
		${JSC_SOURCES}

	DEPENDENCIES
		WTF
		objc
		CoreServices
		CoreFoundation
		Foundation
		icucore
		z
		Security
		cxx
		system
)

target_link_options(JavaScriptCore PRIVATE
	-Wl,-unexported_symbol,__ZTISt9bad_alloc
	-Wl,-unexported_symbol,__ZTISt9exception
	-Wl,-unexported_symbol,__ZTSSt9bad_alloc
	-Wl,-unexported_symbol,__ZTSSt9exception
	-Wl,-unexported_symbol,__ZdlPvS_
	-Wl,-unexported_symbol,__ZnwmPv
	-Wl,-unexported_symbol,__ZNKSt3__18functionIFvvEEclEv
	-Wl,-unexported_symbol,__ZNSt3__18functionIFvvEEC1EOS2_
	-Wl,-unexported_symbol,__ZNSt3__18functionIFvvEEC2EOS2_
	-Wl,-unexported_symbol,__ZNKSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEEclES3_S5_
	-Wl,-unexported_symbol,__ZNSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEED1Ev
	-Wl,-unexported_symbol,__ZNSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEED2Ev
	-Wl,-unexported_symbol,__ZNSt3__18functionIFvvEED1Ev
	-Wl,-unexported_symbol,__ZNSt3__18functionIFvvEED2Ev
	-Wl,-unexported_symbol,__ZTVNSt3__117bad_function_callE
	-Wl,-all_load
)

if(ADDITIONAL_PACKAGES)
	# this isn't included on a default macOS install (which is why it's only built with `ADDITIONAL_PACKAGES`),
	# but i think it's a pretty neat party trick; great for showing off JavaScriptCore in action on the command line
	add_darling_executable(jsc
		jsc.cpp
	)
	target_link_libraries(jsc
		JavaScriptCore
		edit
		cxx
	)
	install(TARGETS jsc DESTINATION libexec/darling/usr/bin)
endif()
